package br.com.sigmah.domain.repository;

import java.util.List;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import br.com.sigmah.domain.entity.HorarioIndisponivelProfessor;
import br.com.sigmah.domain.entity.Professor;
import br.com.sigmah.domain.entity.Usuario;

@Component
public class HorarioIndisponivelProfessorDataManager extends AbstractDataManager<HorarioIndisponivelProfessor,Integer>{


	public HorarioIndisponivelProfessorDataManager() {
		super(HorarioIndisponivelProfessor.class);
	}


	@Transactional
	public HorarioIndisponivelProfessor save(HorarioIndisponivelProfessor horaraioIndiposnivelProfessor) {
		 return getEntityManager().merge(horaraioIndiposnivelProfessor);
	}

	

	@SuppressWarnings("unchecked")
	public List<Usuario> list() {
		return getEntityManager().createQuery("select t from curso t")
				.getResultList();
	}

	
}
